<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .grid{
            display: grid;
            grid-template-columns:repeat(3,1fr) ;

            height: 200px;
            width: 500px;
            margin: auto;
            border-style: solid;
            border-width: 2px;
        }
        .grid div{
            justify-self: center;
            align-self: center;

            background-color: rebeccapurple; 
            height: 100px;
            width: 100px;
        }
        
    </style>
</head>

<body>
    <div class="grid">
        <div >div1</div>
        <div >div2</div>
        <div >div3</div>
    </div>

</body>

</html>